﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Data;

using PolePositionMobileUtilityLogic;
using PolePositionMobileUtilityGeneral;

namespace PolePositionMobileUtilityEntity
{
    public  class ENote : EBaseLookup
    {

        public ENote()
            : base()
        {
            m_TableCollumnId = "NoteId";
            m_TableName = "tb_Notes";
        }
        public ENote(int id, string name)
        {
            Id = id;
            Name = name;
        }

        public ENote[] GetAll()
        {
            DataTable _dt = SelectAll();
            ENote[] arr = new ENote[_dt.Rows.Count];
            for (int i = 0; i < _dt.Rows.Count; i++)
            {
                arr[i] = new ENote(ConvertMobileHelper.ToInt32(_dt.Rows[i][m_TableCollumnId]), ConvertMobileHelper.Tostring(_dt.Rows[i][m_TableCollumnName]));
            }
            return arr;
        }

    }
}
